/**     
 * @{#} ConnectPool.java Create on 2011-7-21 下午09:57:58     
 *     
 * Copyright (c) 2011 by xiaofeng.zhouxf     
 */
package com.sefer.memcached.connectpool;

import com.sefer.memcached.connect.ConnectResources;
import com.sefer.memcached.connect.Connector;
import com.sefer.memcached.constants.HashPolicy;
import com.sefer.memcached.lifecycle.LifeCycle;

/**
 * This interface is used to manage the all connector. In the theory, all
 * connector should gain from here.
 * 
 * @author <a href="mailto:xiaofeng.zhouxf83@gmail.com">xiaofeng.zhouxf</a>
 * @version 1.0
 */
public interface ConnectPool extends LifeCycle {

	/**
	 * Get connector by key.
	 * 
	 * @param key
	 *            client want insert into the message;
	 * @return
	 */
	Connector getConnector(Object key);

	boolean initPool(ConnectResources resources);

	void setArithmetic(HashPolicy policy);

}
